public class t2347 {
    public static void main(String[] args) {
        int[] ranks = {13,2,2,1,9};
        char[] suits = {'a','b','a','a','a'};
        System.out.println(bestHand(ranks, suits));
    }
    public static String bestHand(int[] ranks, char[] suits) {
        int count = 0;
        if(suits[0]==suits[1] &&suits[0]==suits[2] &&suits[0]==suits[3]&&suits[0]==suits[4]){
            return "Flush";
        }else{
            int num;
            for(int i =0;i<ranks.length;i++){
                num = 1;
                for(int j = 0;j<ranks.length;j++){
                    if(i==j)continue;
                    else{
                        if(ranks[i]==ranks[j])num++;
                    }
                }
                count = Math.max(count,num);
                if(count>=3) return "Three of a Kind";
            }
            if(count==2) return "Pair";
        }
        return "High Card";
    }
}
